{% extends 'base.html' %}

{% block title %}注册{% endblock %}

{% block content %}
    <h3>用户注册</h3>

    {% for message in get_flashed_messages(category_filter=['error']) %}
        <p style="color: red;">{{ message }}</p >
    {% endfor %}

    {% for message in get_flashed_messages(category_filter=['success']) %}
        <p style="color: green;">{{ message }}</p >
    {% endfor %}

    <form method="post">
      <table>
           <tr>
                <td>用户名:</td>
                <td><input type="text" name="username"></td>
           </tr>

           <tr>
               <td>密码:</td>
               <td><input type="password" name="password"></td>
           </tr>

          <tr>
              <td>确认密码:</td>
              <td><input type="password" name="confirm_password"></td>
          </tr>

          <tr>
              <td></td>
              <td><input type="submit" value="注册"></td>
          </tr>
      </table>

    </form>
    <p>已有账号?<a href="{{url_for('login')}}">去登录</a></p>

{% endblock %}